package cn.xuexiluxian.open.admin.controller.common;

import cn.xuexiluxian.open.common.constant.Constants;
import cn.xuexiluxian.open.common.response.ResponseResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("version")
public class VersionController {

    @GetMapping("")
    public ResponseResult version(){
        Map<String, Object> map = new HashMap<>();
        map.put("server", Constants.SERVER_VERSION);
        map.put("client", Constants.CLIENT_VERSION);
        return ResponseResult.ok(map);
    }
}
